package ch6;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class FileRead {

	public static void main(String[] args) {
		File f = new File("src/ch6/FilePath2.java");
		FileReader fr = null;
		try {

			fr = new FileReader(f);
			int ch = 0;
			while ((ch = fr.read()) != -1) {
				System.out.print((char) ch);
				// System.out.print(" ");
			}
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		} finally {
			if (fr != null)
				try {
					fr.close();
				} catch (IOException e) {
					// TODO 自动生成的 catch 块
					e.printStackTrace();
				}
		}

	}

}
